home *** CD-ROM | disk | FTP | other *** search
- ` -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- ` Hypnotica Level 1
- ` -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- ` By Rich Davey (rich@fatal-design.com)
- ` -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- ` Music listened to while coding this
- ` Revive - Bjorn Lynne
- ` -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- ` Note:
- `
- ` Not too sure about speed on other 3D
- ` cards, but works a treat on my GeForce!
-
- sync rate 0
- sync on
- hide mouse
-
- load music "tune1.mid",1
- load music "tune2.mid",2
- load image "zoneface.bmp",1
-
- dim x(300)
- dim y(300)
-
- for a=0 to 300
-
- x(a)=sin(a)*sin(a)*3*200
- y(a)=cos(a)*sin(a)*1*200+200
-
- next a
-
- a=0 : tg=50
-
- set text font "Courier"
-
- loop music 2
-
- repeat
-
- cls 0
-
- for b=0 to 40
-
- ink rgb(255-1+b*2,255-1+b*2,255-1+b*2),0
- dot x(b+183-a)+1,y(b+183-a)+1
-
- next b
-
- ink rgb(0,tg,0),rgb(0,0,0)
- center text 300,180,"H Y P N O T I C A"
- center text 300,200,"Press 1 - 5 to select trip"
-
- paste image 1,420+rnd(4),250+rnd(4)
-
- inc a
- if a=183 then a=0
-
- inc tg
- if tg=255 then tg=50
-
- q=scancode()
-
- sync
-
- until q>1 and q<7
-
- px=16 : py=188 : s=10 : c=0
-
- autocam off
-
- for a=1 to 40
-
- if q=2 then make object plain a,px,py
- if q=3 then make object cone a,px*3
- if q=4 then make object cylinder a,px*3
- if q=5 then make object sphere a,px*3
- if q=6 then make object cube a,px*3
-
- position object a,a+px,0,50+a+s
-
- ghost object on a
-
- if a=21 then c=10
-
- if a<21
- inc c,10
- color object a,rgb(c,50,255-c)
- else
- inc c,10
- color object a,rgb(255-c,c,50)
- ` color object a,rgb(255-c,50,c)
- endif
-
- next a
-
- ` stuff
-
- color backdrop rgb(0,0,0)
- position camera 20.5,5,0
- set ambient light 100
-
- offset=2
- speed=2
-
- fog#=0
- fog_speed=250
- fog_timer=timer()
- fog_direction=2
-
- fog distance 0
- fog color rgb(0,0,0)
- fog on
-
- stop music 2
- loop music 1
-
- do
-
- for a=1 to 40
- xrotate object a,wrapvalue(b+a*offset)
- if yr=1 then yrotate object a,wrapvalue(b+a*offset)
- zrotate object a,wrapvalue(b+a*offset)
- next a
-
- inc b,speed
- if b=360 then b=0
-
- if timer()<=fog_timer+fog_speed
-
- fog_timer=timer()
-
- if fog_direction=1
- dec fog#,0.5
- if fog#=0
- fog_direction=2
- offset=rnd(8)+1
- speed=rnd(2)+1
- yr=rnd(1)
- endif
- else
- inc fog#,0.25
- if fog#=250 then fog_direction=1
- endif
-
- fog distance fog#
-
- endif
-
- zrotate camera wrapvalue(b)
-
- if spacekey()=1 then end
-
- sync
-
- loop
-
-